

package com.hazelcast.map.impl;

import com.hazelcast.map.MapInterceptor;

/**
 * Helper interceptor methods for {@link MapServiceContext}.
 */
public interface MapServiceContextInterceptorSupport {

    Object interceptGet(InterceptorRegistry interceptorRegistry, Object value);

    void interceptAfterGet(InterceptorRegistry interceptorRegistry, Object value);

    Object interceptPut(InterceptorRegistry interceptorRegistry, Object oldValue, Object newValue);

    void interceptAfterPut(InterceptorRegistry interceptorRegistry, Object newValue);

    Object interceptRemove(InterceptorRegistry interceptorRegistry, Object value);

    void interceptAfterRemove(InterceptorRegistry interceptorRegistry, Object value);

    String generateInterceptorId(String mapName, MapInterceptor interceptor);

    void addInterceptor(String id, String mapName, MapInterceptor interceptor);

    boolean removeInterceptor(String mapName, String id);
}
